/*
 * Package: org.grassfield.common.dao
 * FileName: TeamDAO.java
 *  
 * Created by pandian on Jan 28, 2011
 */
package dao;

import java.util.List;

import bean.Team;



/**
 * The Class TeamDAO.
 */
public class TeamDAO extends BaseDAO implements ITeamDAO {

	@Override
	public Team find(Long id) {
		List<Object> list = super.list("from Team where id=?", new Object[]{id});
		if (list.isEmpty())
			return null;
		return (Team) list.get(0);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Team> list() {
		return super.list("from Team order by name");
	}

}
